This is the root object that represents the MyAlbum application itself.
Note: For case-sensitive languages like JScript, make sure you type App and not app.
Version | String | read-only | The version of the running MyAlbum application. |
Visible | Boolean | read-write | Shows or hides the application. |
nbAlbum | long | read-only | Number of open albums. |
nJPEGQuality | short | read-write | Quality (0..100) when saving a JPEG file. |
bJPEGProgresive | boolean | read-write | Saves JPEG using progressive encoding. |
nMultiX | short | read-write | Number of pictures in a row in multi-display mode. |
nMultiY | short | read-write | Number of pictures in a column in multi-display mode. |
nMultiPercentage | short | read-write | Relative size of the picture in multi-display mode. |
nMarginLeft | long | read-write | Size of the left margin (mm) when printing. |
nMarginRight | long | read-write | Size of the right margin (mm) when printing. |
nMarginTop | long | read-write | Size of the top margin (mm) when printing. |
nMarginBottom | long | read-write | Size of the bottom margin (mm) when printing. |
nSlideSizePrt | long | read-write | Size of the thumbnail (mm) when printing. |
sFontPrinterThumbnail | String | read-write | Font used when printing the thumbnails. |
sFontPrinterTitle | String | read-write | Font used when printing the page title. |
sFontPrinterFooter | String | read-write | Font used when printing the page footer. |
nbMAX | long | read only | Number of loaded MAX extension. |
nUseNavigation | long | read-write | Navigation flags (see below). |
nState | long | read only | State of the application (STATE_NONE=0, STATE_ALBUM=1, STATE_FULLVIEW=2, STATE_PLAYING=4). |
bMultiMode | Boolean | read-write | Set or clear the multi-display mode. |
nMultiSubMode | Long | read-write | Select the mode of the multi-display. |
StatusBarText | String | read-write | The text displayed at the bottom of the main window. |
nSlideshowMode | Long | read-only | The current display / slideshow mode (use the SS_xxx constants described below). |
sInfo | String | read-write | String for storing temporary info. |
lLastKeyPressed | long | read-write | Code of the last key pressed in the application (thumbnail view or full-screen view): the lower word contains the virtual-key code of the key (VK_xxx constants) and bit 0x00010000 is set if the Shift key is also pressed, bit 0x00020000 for the Ctrl key and bit 0x00040000 for the Alt key. Modifying this property has no effect. |
nStretchMode | Long | read-write | Mode used for resizing the pictures when converting pictures and generating the thumbnails (see Resizing modes in the Album object page). |
sScriptFile | String | read-only | The filename of the currently running script (if any). |
sDateTimeFormat | String | read-write | The format of the date / time. |
LoadAlbum(pszFileName As String) As Object
Loads the specified album.
GetAlbum(long numAlbum) As Object
Retrieves an open album (first is 0).
GetCurrentAlbum() As Object
Retrieves the current album.
NewAlbum() As Object
Creates a new empty album.
Trace(pszMsg As String, [optional] crColor as Long, [optional] uIcon as Long )
Displays the specified string in the trace window. Text color can be changed with the crColor
parameter and an icon can be displayed at the begining of the line (use the TRACE_xxx constants
described below).
Optional parameters:
crColor = -1 (use default script color),
uIcon = -1 (no icon).
ClearTrace()
Clears the trace window.
HTMLFileName(sFile As String, sBasePathName As String, [optional] bData as Boolean) As String
Constructs a web compatible path name for a file. A relative path will be built, if possible, using the folder specified by the sBasePathName parameter (the folder of the album file is usually used there).
Characters that should not appear in a URL are escaped (' ' -> %20 for instance).
If bData is True, characters like & = or ? are also escaped.
Optional parameter: bData = False.
ConvertString(sString As String, nType as Integer) As String
Convert the string to the another coding. In this version, the nType parameter is ignored (and
should be 0) and the string is converted to UTF-8.
Run(pszCommand As String, bIsFile As Boolean, nMode As Long) As Long
Starts an application (bIsFile=False) or open a file using its associated application (bIsFile=True). nMode: bits 0-3 are for the new window state (Windows SW_xxx constants): 0:hidden, 1:Normal, 2:minimize, 3:maximized, 4:inactive. Bit 16 specifies if the application will be run synchronously with MyAlbum (1) i.e. MyAlbum will wait for the application to terminate or asynchronously (0).
The return value is 0 if the command has been launched (for a synchronous command, it contains the exit code).
TimeToString(lDate As Long, nDateType As Long, [optional] sFormat as String ) As String
Converts a date or time value to a string. For the nDateType parameter, use the CF_DATE (1) or CF_TIME (2)
constants. Format can be specified: for instance "HH:mm:ss" for a time or "MM/dd/yyyy" for a date.
Optional parameter: sFormat = use default user format.
TimeValueToDate(lDate As Long) As Date
Convert a date or time value to a date object.
DateToTimeValue (date As Date) As Long
Convert a date object to a time/date value.
GetMAX(sMaxName as String) as Object
Retrieves the specified MAX extension.
GetMAXByNum(iMax as Long) as Object
Retrieves the specified MAX extension by its position (0..nbMAX-1)
Wait(lDelay as Long)
Waits for the specified delay (ms).
GetTickCount() As Long
Retrieves the number of milliseconds that have elapsed since the system was started.
HTMLDialog(sHTMLFile As String, sArgs As String, sDlgParam As String) As String
Opens a HTML dialog box (IE 4 must be installed).
SendMessage(bPost As Boolean, nDest As Short, uMsg As Long, wParam As Long, lParam As Long) As Long
Sends or posts a Windows message to a MyAlbum window:
- nDest=0 Main frame of the application,
- nDest=1 Current view of the current album,
- nDest=2 Full-screen display window.
PlaySound(sSound As String, hMod As Long, fdwSound As Long) As Boolean
Play a sound (hMod must be 0):
- Play a wav file specified by the sSound parameter (fdwSound=&H00020000)
- Play a system sound when fdwSound= &H00110000:
- sSound = 1 ASTERISK
- sSound = 2 QUESTION
- sSound = 3 HAND
- sSound = 4 EXIT
- sSound = 5 START
- sSound = 6 WELCOME
- sSound = 7 EXCLAMATION
- sSound = 8 DEFAULT
DecodeBase64ToFile( sSource As String, sDestFilesSound As String) As Boolean
Decode the Base64 encoded string to a file.
HTTPGet(sURL As String, sFile As String) As Long
Retrieve a file from the Web and store it in a local file.
HTTPGetString(sURL As String) As String
Retrieve a text file from the Web and return it as a string.
GetFullScreenView() As Object
Retrieves the view used for full-screen display (or null if not in full-screen mode).
AddCustomTool( sCaption As String, sCmd As String, lVirtualKeyCode As Long, lModifiers As Long, bSave As Boolean) As Boolean
Create a new (or modify an existing) custom tool. sCaption is the string that will appear in the Tools menu. sCmd is the command to execute in the form i|cmd
(i=1 for a script file, i=2 for VBScript code and i=3 for JavaScript code). lVirtualKeyCode and lModifiers define the shortcut used to start the tool. When bSave is True, the custom tool definition will be saved.
RemoveCustomTool( sCaption As String, bSave As Boolean) As Boolean
Remove an existing custom tool identified by its caption (the string that appears in the Tools menu). When bSave is True, the custom tool definition will be removed from the registry.
GetFilename( sCaption As String, nType As Long, sInitName As String, sFilter As String, lFlags As Long ) as String
Open the standard dialog box for selecting a file or a folder. Depending on the nType parameter:
- 0: Select a file to be opened.
- 1: Select a file to be saved (new file).
- 2: Select a folder.
sInitName contains the initial name for opening a new file or the selected folder when selecting a folder.
sFilter specifies the list of extensions that will appear in the Files of type drop-down list.
For instance:
Album file (*.alb)|*.alb|All files (*.*)|*.*||
(note the double |
at the end of the filter).
sInitName may contain OFN_xxx
constants.
CaptureScreen( x as Short, y as Short, w as Short, h as Short, ) As Boolean
Capture a rectangle bitmap from the screen and copy it to the Windows clipboard.
Navigation flags:
This is a 32 bit value containing various information:
USE_SPACEBAR | 0x1 | Space bar is used in slideshow. |
USE_MOUSE | 0x2 | Mouse is used in slideshow. |
USE_JOYSTICK | 0x4 | Joystick is used in slideshow. |
USE_SUSPENDSS | 0x8 | Screen saver is deactivated during slideshow. |
USE_IGNOREERROR | 0x10 | Errors are ignored during slideshow. |
USE_NOWAITFORVIDEO | 0x20 | Slideshow waits or not for the end of videos. |
USE_REVERSEDROP | 0x40 | Pictures are dropped in the reverse order. |
USE_NOMESSAGES | 0x80 | Most messages are not shown. |
USE_FSTOPMOST | 0x100 | Full screen window is a top-most window. |
USE_ALWAYSALBUMSOUND | 0x200 | Album sound command is played even in single picture display mode (normally played only in slideshow mode). |
Slideshow mode:
This is a 32 bit value containing the following information:
SS_NONE | 0 | Thumbnail view mode. |
SS_VIEWPIC | 1 | Single picture viewing. |
SS_NORMAL | 2 | Standard slideshow. |
SS_SELECTED | 3 | Slideshow of the selected picture. |
SS_RANDOM | 4 | Random slideshow. |
SS_AUTO | 0x10000 | Automatic slideshow. |
SS_MULTI | 0x20000 | Multiple slideshow. |
Trace icons:
TRACE_NONE | -1 | No icon. |
TRACE_INFORMATION | 0 | Information sign |
TRACE_OK | 1 | OK check mark |
TRACE_WARNING | 2 | Warning sign |
TRACE_ERROR | 3 | Error sign |
TRACE_SCRIPTERROR | 4 | Error in a script |
TRACE_QUESTION | 5 | Question mark |
TRACE_REDDOT | 6 | Red dot |
TRACE_GREENDOT | 7 | Green dot |
TRACE_YELLOWDOT | 8 | Yellow dot |
TRACE_ARROW | 9 | Arrow pointing to the right |
TRACE_BOMB | 10 | Bomb |
TRACE_FLAGCOMPLETE | 11 | Complete flag |
TRACE_FAILURE | 12 | Faillure sign |
TRACE_POSITIVE | 13 | Positive sign |
TRACE_NEGATIVE | 14 | Negative sign |
TRACE_LIGHTON | 15 | Lightbulb on |
TRACE_LIGHTOFF | 16 | Lightbulb off |
TRACE_LOOKAT | 17 | Look at sign |
TRACE_TLRED | 18 | Red traffic light |
TRACE_TLYELLOW | 19 | Yellow traffic light |
TRACE_TLGREEN | 20 | Green traffic light |
TRACE_WAIT | 21 | Wait sign |
TRACE_UNCHECKED | 22 | Unchecked option symbol |
TRACE_CHECKED | 22 | Checked option symbol |
Font format:
String containing the following fields:
FaceName,Height,Width,Weight,Italic,Underline,StrikeOut
With:
For instance:
Arial,8,0,400,1,0,0
is a italicized Arial font of 8 points height.